package Entity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;


@Entity
@Table(schema="poleinfodb", name = "share")
@PrimaryKeyJoinColumn(name="ID_CONTRACT")
public class Share extends Contract{

	@Basic(optional=false)
	private double price;

	public Share(int id_Contract, Society society, Offer offer,
			Investor investor, String name, double open, double close,
			double high, double low, double price) {
		super(id_Contract, society, offer, investor, name, open, close, high,
				low);
		this.price = price;
	}
	public Share( Society society, Offer offer,
			Investor investor, String name, double open, double close,
			double high, double low, double price) {
		super( society, offer, investor, name, open, close, high,
				low);
		this.price = price;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}


}
